<?php $this->placeholder('toolBar')->captureStart() ?>

<input class="button controlButton" type="button" onclick="doLucene('build')"  value="Перестроить" />
<input class="button controlButton" type="button" onclick="doLucene('optimize')"   value="Оптимизировать" />
<input class="button controlButton" type="button"  onclick="doLucene('clear')"  value="Очистить" />  

<?php $this->placeholder('toolBar')->captureEnd() ?>

<script>
function doLucene(operation) 
{
blockUI('Обработка поискового индекса');
	$.getJSON(url('search/perform/operation/' + operation), function (data){
console.dir(data);
		$("#searchDocuments").html(data.Documents);
		$("#searchIndex").html(data.Index);
		
		unBlockUI();
		});
}
</script>

<div>
<div><b>Documents:</b><span id="searchDocuments"><?=$this->info['Documents'] ?></span></div>
<div><b>Index:</b><span id="searchIndex"><?=$this->info['Index'] ?></span></div>
</div>
